﻿using Microsoft.AspNet.SignalR;
using SimpleTaskSystem.WebSpaAngular.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace SimpleTaskSystem.WebSpaAngular.Controllers
{
    public class DefaultController : Controller
    {
        /// <summary>
     　　/// 消息推送上下文
     　　/// </summary>
        protected static IHubContext ChatHubContext = GlobalHost.ConnectionManager.GetHubContext<ChatHub>();
        // GET: Default
        public ActionResult Index()
        {
             
            
            return View();
        }
        public ActionResult Index2()
        {
            //通知待办事项
            ChatHubContext.Clients.Groups("".Split(',')).broadcastTodo("", new { type = "new", data = "" });
            return View();
        }
    }
}